﻿<UserControl x:Class="TestCaseManagerApp.SettingsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             xmlns:local="clr-namespace:TestCaseManagerCore.Helpers;assembly=TestCaseManagerCore"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <ScrollViewer>
            <StackPanel x:Name="Panel" MinWidth="150">
                <TextBlock Text="Settings" FontWeight="Bold" Margin="0,0,0,8" Height="Auto" FontSize="26" />

                <ListBox ItemsSource="{Binding AccentColors}"
                         SelectedItem="{Binding SelectedAccentColor, Mode=TwoWay}"
                         Margin="0,0,0,16">
                    <ListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                            <WrapPanel MaxWidth="{Binding ActualWidth, ElementName=Panel}" />
                        </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Rectangle Width="40" Height="40" Margin="2" >
                                <Rectangle.Fill>
                                    <SolidColorBrush x:Name="Brush" Color="{Binding}" />
                                </Rectangle.Fill>
                            </Rectangle>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>

                <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition MinWidth="120"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>

                    <TextBlock Text="Theme:" VerticalAlignment="Center" Margin="0,0,16,4" />
                    <ComboBox Grid.Column="1" Name="cbThemes" ItemsSource="{Binding Themes}" SelectedItem="{Binding SelectedTheme, Mode=TwoWay}" DisplayMemberPath="DisplayName" VerticalAlignment="Center" local:ComboBoxDropdownExtensions.OpenDropDownAutomatically="True" MouseMove="cbThemes_MouseMove" Margin="0,0,0,4" />
                    
                </Grid>
                <Grid Grid.ColumnSpan="2">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="3*" />
                    </Grid.ColumnDefinitions>
                        <Label Content="Associate Automation Project Dll Path" FontWeight="Bold" FontSize="12" Margin="10" Grid.Row="0"/>
                        <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="0">
                            <TextBox Margin="10" Name="tbAssociatedProjectDllPath" MinWidth="380"/>
                            <Button Name="btnBrowse" Content="Browse" Margin="10" Width="100" Height="24" Click="btnBrowse_Click" />
                        </StackPanel>
                    
                        <TextBlock Text="Hover Behavior Drop Drown" Margin="10" Height="25" Width="Auto" HorizontalAlignment="Left" Grid.Row="1"/>
                        <CheckBox Margin="10" HorizontalAlignment="Left" IsChecked="{Binding Path=HoverBehaviorDropDown, Mode=TwoWay}" Checked="CheckBox_Checked" Grid.Column="1" Grid.Row="1"/>

                        <TextBlock Text="Show Comment Window" Margin="10" Height="25" Width="Auto" HorizontalAlignment="Left" Grid.Row="2"/>
                        <CheckBox Margin="10" HorizontalAlignment="Left" IsChecked="{Binding Path=ShouldCommentWindowShow, Mode=TwoWay}" Checked="CheckBox_Checked" Grid.Column="1" Grid.Row="2"/>
                </Grid>

            </StackPanel>
        </ScrollViewer>
    </Grid>
</UserControl>
